<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>友情链接更改</title>
		<link rel="stylesheet" type="text/css" href="../css/style1.css" />
		<link rel="stylesheet" type="text/css" href="../css/base.css" />
		<link rel="stylesheet" type="text/css" href="../css/indexbody.css" />
		<script type="text/javascript" src="../js/frame.js"></script>
		<script type="text/javascript"
			src="../js/My97DatePicker/WdatePicker.js"></script>
		<script src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
		<script type="text/javascript"
			src="../js/jquery.easydrag.handler.beta2.js"></script>
		<script type="text/javascript">
	window.onload=function(){
		document.getElementById("hide").style.display="block";
			document.getElementById("sc").style.display="none";
			document.getElementById("vip").style.display='none';
			document.getElementById("mb").style.display='none';
			document.getElementById("sys").style.display='none';
	}
	function popupDiv(div_id) { 
			$("body").css("background-color","#E6E6E6");
            var div_obj = $("#" + div_id); 
            //窗口宽度,高度 
            var winWidth = $(window).width(); 
            var winHeight = $(window).height(); 
            //弹出的div的宽度,高度 
            var popHeight = div_obj.height(); 
            var popWidth = div_obj.width(); 
            div_obj.animate({ opacity: "show", left: (winWidth-popWidth) / 2, top: (winHeight-popHeight)/2,width:popWidth,height:popHeight}, 300);   
        }         
        function hideDiv(div_id) { 
            $("#" + div_id).animate({opacity: "hide" }, 300); 
			$("body").css("background-color","#ffffff");
        } 
        $(function() { 
            $(".pop_box").easydrag(); 
            $(".pop_box").setHandler(".pop_box .p_head"); 
         }); 
</script>
</head>
<body background='../images/allbg.gif' leftmargin='8' topmargin='8'>
 <div id="container">
       <jsp:include page="../header.jsp"></jsp:include>
        <div style="float:left; width:195px; height: 550px">
        	<jsp:include page="../leftnav.jsp"></jsp:include>
        </div>
       <div style="float:left; overflow-y:scroll; overflow-x:hidden; width: 785px; height: 550px;">

<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6">
  <tr>
    <td height="28" background="../images/tbg.gif" style="padding-left:10px;">
    	<b><a href="<%=path%>/manager/core/findLinksAll.action"><u>友情链接管理</u></a></b> &gt;&gt; 链接更改</td>
</tr>
<tr>
    <td height="200" bgcolor="#FFFFFF" valign="top">
	<form action="<%=path%>/manager/core/updateLinksInfo.action" method="post"  name="form1">
	<input type="hidden" name="links.id" value="<s:property value="links.id"/>">
	<table width="80%"  border="0" cellspacing="1" cellpadding="3">
	      <tr>
        <td height="25">网站Logo：</td>
        <td>
        <s:if test="uploadLogo!=null">
			<input type="hidden" name="links.hostLogo" value="<s:property value='uploadLogo'/>"/>
			<img src="<s:property value="uploadLogo"/>" alt="网站logo" title="网站logo"id="logoImage" width="150" height="50" border="0" />
		</s:if>
		<s:else>
		<input type="hidden" name="links.hostLogo" value="<s:property value="links.hostLogo"/>"/>
			<img src="<s:property value="links.hostLogo"/>" alt="网站Logo" title="网站Logo" id="logoImage" width="150" height="50" border="0"/>
		</s:else>
        	<input type="button" value="请选择LOGO" class="log" onclick="popupDiv('pop_div');" />
         </td>
      </tr>
	  <tr>
        <td width="19%" height="25">网址：</td>
        <td width="81%">
        <input name="links.hostAddress" type="text" id="url" value="<s:property value="links.hostAddress"/>" size="30" class='pubinputs' />
        </td>
      </tr>
      
      <tr>
        <td width="19%" height="25">排列位置：</td>
        <td width="81%">
        <input name="links.orders" type="text" id="sortrank" value="<s:property value="links.orders"/>" size="10"  class='pubinputs' style="width:60px" />
        (由小到大排列)
        </td>
      </tr>
      <tr>
        <td height="25">网站名称：</td>
        <td><input name="links.hostName" type="text" id="webname" size="30" value="<s:property value="links.hostName"/>" class='pubinputs' /></td>
      </tr>

      <tr>
        <td height="25">网站简况：</td>
        <td>
        <textarea name="links.description" cols="40" rows="4" id="msg" style="text-align: left;">
        <s:property value="links.description"/>
        </textarea></td>
      </tr>
      <tr>
        <td height="25">站长Email：</td>
        <td><input name="links.hostEmail" type="text" id="email" size="30" value="<s:property value="links.hostEmail"/>" class='pubinputs' /></td>
      </tr>
      <tr>
        <td height="25">创建时间：</td>
        <td><input name="links.createTime" type="text" value="<s:property value="links.createTime"/>" class='pubinputs' onclick="WdatePicker({isShowWeek:true})" readonly="readonly" /></td>
      </tr>
      <tr>
        <td height="51">&nbsp;</td>
        <td>
        	<input type="submit" name="Submit" value=" 提 交 " class="np coolbg" />　 　
          <input type="reset" name="Submit" value=" 返 回 " onclick="location.href='<%=path%>/manager/core/findLinksAll.action'" class="np coolbg" />
         </td>
      </tr>
    </table>
	</form>
 </td>
</tr>
</table>     
			<div id='pop_div' class="pop_box"> 
        <div class="p_head">
            <div class="p_h_title">请选择Logo >><a class="p_h_x" onclick="hideDiv('pop_div');" title="关闭窗口"><img src="../images/x.jpg" style="margin-top:8px;" /></a></div>
        </div>
        <form action="<%=path %>/manager/core/uploadActionUpdate.action" method="post" enctype="multipart/form-data">
        <input type="hidden" name="id" value="<s:property value="links.id"/>"/>
        <div style=" height:90px; width:350px; margin-top:80px; margin-left:20px;">
        	<ul style="line-height:40px;">
            	<li style=" color:#999; font-weight:bold;">在你的电脑上选择一张图片</li>
                <li><s:file name="file" id="file" cssStyle="height:21px; border:#CCC 1px solid; width:250px;" theme="simple"></s:file></li>
            </ul>
            <div style="font-size:12px; font-weight:bold; color:#999; text-align:center; margin:0 auto; margin-top:20px;" >
            支持JPG. JPEG. PNG等格式的图片，图片大小不超过1MB<br />
            </div>
            <div style=" margin-top:70px; width:200px; margin-left:100px">
            	<input type="submit" value="开始上传" />&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" value="取消上传" onclick="hideDiv('pop_div'); "/>
            </div>
        </div>
        </form>
    </div> 	
       </div>
    </div>
</body>
</html>